package com.eudon.design_pattern.creational.builder;

import com.eudon.design_pattern.creational.abstract_factory.storage.HighStorage;
import com.eudon.design_pattern.creational.builder.component.Charger;
import com.eudon.design_pattern.creational.builder.component.Color;
import com.eudon.design_pattern.creational.builder.component.Cpu;
import com.eudon.design_pattern.creational.builder.component.memory.HighMemory;

/**
 * @author eudon
 * @description 使用示例
 * @date 2025/9/1
 * @email syd19970616@gmail.com
 * @address <a href="https://gitee.com/eudon">Gitee</a>
 */
public class Use {
    public static void main(String[] args) {
        Phone phone = Phone.builder()
                .withCpu(Cpu.HIGH)
                .withMemory(new HighMemory())
                .withStorage(new HighStorage())
                .withCharger(Charger.HIGH)
                .withColor(Color.GREEN)
                .build();
        System.out.println(phone);
    }
}
